package br.com.sgac.remote{

	import br.com.sgac.objetos.Paciente;
	
	import mx.rpc.AsyncToken;
	import mx.rpc.Responder;

	public class remotePaciente extends Remote{
		public function remotePaciente()		{
			getInstance();
		}
		public function inserirPaciente(result:Function,paciente:Paciente,source:String):void{
			_remote.source = source;
			var async:AsyncToken = _remote.inserirPaciente(paciente);
			async.addResponder(new Responder(result,defaultFaultHandler));
			
		}
		public function listarTodosPaciente(result:Function,source:String):void{
			_remote.source = source;
			var async:AsyncToken = _remote.listarTodosPacientes();
			async.addResponder(new Responder(result,defaultFaultHandler));
			
		}
		public function listarPacientes(result:Function,nomePaciente:String,source:String):void{
			_remote.source = source;
			var async:AsyncToken = _remote.listarPacientes(nomePaciente);
			async.addResponder(new Responder(result,defaultFaultHandler));
			
		}
	}
}